{eq name="isShow" value="1"}
<div id="attrList" class="form-control-static">
    <div class="div_contentlist">
        {volist name="attrList" id="one" key="k"}
        <input type="hidden" name="attr[{$k-1}][item_name]" value="{$one.item_name}" />
        <h4 class="Father_Title">{$one.item_name}:</h4>
        <div class="Father_Item Father_Item{$k-1}">
            <label class="checkbox-inline"><input type="checkbox" class="checkboxItem check_all" value="全选"> 全选</label>
            {volist name="one.item_list" id="two"}
            <label class="checkbox-inline"><input type="checkbox" class="checkboxItem check_item" value="{$two}"> {$two}</label>
            {/volist}
        </div>
        <div class="clearfix"></div>
        {/volist}
    </div>
</div>
<div id="createTable">
    {notempty name="skulist"}
    <table class="table table-bordered attrTable">
        <thead>
        <tr>
            <th nowrap>规格</th>
            <th width="180">商品货号</th>
            <th width="80">库存 <a href="javascript:;" onclick="setVal(2)">设置</a></th>
            <th width="100">市场价 <a href="javascript:;" onclick="setVal(3)">设置</a></th>
            <th>销售价 <a href="javascript:;" onclick="setVal(4)">一口价</a> <a href="javascript:;" onclick="setPrice()">阶梯价</a></th>
            <th width="80"><a href="javascript:;" onclick="setVal(5)">运费(g)</a></th>
            <th width="60"><a href="javascript:;" onclick="setVal(6)">起订量</a></th>
            <th width="60"><a href="javascript:;" onclick="setVal(7)">步长</a></th>
            <th width="60">操作</th>
        </tr>
        </thead>
        <tbody>
        {volist name="skulist" id="vo"}
        <tr>
            <td>
                {$vo.sku_name}
                <input name="sku[{$i-1}][sku_id]" type="hidden" class="form-control input-sm" value="{$vo.sku_id}" />
                <input name="sku[{$i-1}][sku_name]" type="hidden" class="form-control input-sm" value="{$vo.sku_name}" />
            </td>
            <td><input name="sku[{$i-1}][sku_sn]" type="text" class="form-control input-sm" datatype="*" value="{$vo.sku_sn}" /></td>
            <td><input name="sku[{$i-1}][goods_stock]" class="form-control input-sm" datatype="*" type="text" value="{$vo.goods_stock}" /></td>
            <td><input name="sku[{$i-1}][market_price]" class="form-control input-sm" datatype="*" type="text" value="{$vo.market_price}" /></td>
            <td><input name="sku[{$i-1}][goods_price]" class="form-control input-sm" datatype="*" type="text" value="{$vo.goods_price}" /></td>
            <td><input name="sku[{$i-1}][goods_freight]" class="form-control input-sm" datatype="*" type="text" value="{$vo.goods_freight}" /></td>
            <td><input name="sku[{$i-1}][minimum]" class="form-control input-sm" datatype="*" type="text" value="{$vo.minimum}" /></td>
            <td><input name="sku[{$i-1}][step]" class="form-control input-sm" datatype="*" type="text" value="{$vo.step}" /></td>
            <td><a href="javascript:;" data-url="{:url('delSku')}" data-params="sku_id={$vo.sku_id}" onclick="delSku(this)">删除</a></td>
        </tr>
        {/volist}
        </tbody>
    </table>
    {/notempty}
</div>
{/eq}
<!--无SKU-->
{eq name="isShow" value="0"}
<table class="table attrTable">
    <thead>
    <tr>
        <th nowrap>规格</th>
        <th width="180">商品货号</th>
        <th width="80"><a href="javascript:;" onclick="setVal(2)">库存</a></th>
        <th width="100"><a href="javascript:;" onclick="setVal(3)">市场价</a></th>
        <th>销售价 <a href="javascript:;" onclick="setVal(4)">一口价</a> <a href="javascript:;" onclick="setPrice()">阶梯价</a></th>
        <th width="80"><a href="javascript:;" onclick="setVal(5)">运费</a></th>
        <th width="60"><a href="javascript:;" onclick="setVal(6)">起订量</a></th>
        <th width="60"><a href="javascript:;" onclick="setVal(7)">步长</a></th>
    </tr>
    </thead>
    <tbody>
    {notempty name="skulist"}
    {volist name="skulist" id="vo"}
    <tr>
        <td>
            {$vo.sku_name}
            <input name="sku[{$i-1}][sku_id]" type="hidden" class="form-control input-sm" value="{$vo.sku_id}" />
            <input name="sku[{$i-1}][sku_name]" type="hidden" class="form-control input-sm" value="{$vo.sku_name}" />
        </td>
        <td><input name="sku[{$i-1}][sku_sn]" type="text" class="form-control input-sm" datatype="*" value="{$vo.sku_sn}" /></td>
        <td><input name="sku[{$i-1}][goods_stock]" class="form-control input-sm" datatype="*" type="text" value="{$vo.goods_stock}" /></td>
        <td><input name="sku[{$i-1}][market_price]" class="form-control input-sm" datatype="*" type="text" value="{$vo.market_price}" /></td>
        <td><input name="sku[{$i-1}][goods_price]" class="form-control input-sm" datatype="*" type="text" value="{$vo.goods_price}" /></td>
        <td><input name="sku[{$i-1}][goods_freight]" class="form-control input-sm" datatype="*" type="text" value="{$vo.goods_freight}" /></td>
        <td><input name="sku[{$i-1}][minimum]" class="form-control input-sm" datatype="*" type="text" value="{$vo.minimum}" /></td>
        <td><input name="sku[{$i-1}][step]" class="form-control input-sm" datatype="*" type="text" value="{$vo.step}" /></td>
    </tr>
    {/volist}
    {else/}
    <tr>
        <td>#<input name="sku[0][sku_name]" type="hidden" class="form-control input-sm" value=""></td>
        <td><input name="sku[0][sku_sn]" type="text" class="form-control input-sm" datatype="*" value="{:rand_number()}"></td>
        <td><input name="sku[0][goods_stock]" class="form-control input-sm" datatype="*" type="text" value="100"></td>
        <td><input name="sku[0][market_price]" class="form-control input-sm" datatype="*" type="text" value=""></td>
        <td><input name="sku[0][goods_price]" class="form-control input-sm" datatype="*" type="text" value=""></td>
        <td><input name="sku[0][goods_freight]" class="form-control input-sm" datatype="*" type="text" value="0" /></td>
        <td><input name="sku[0][minimum]" class="form-control input-sm" datatype="*" type="text" value="1" /></td>
        <td><input name="sku[0][step]" class="form-control input-sm" datatype="*" type="text" value="1" /></td>
    </tr>
    {/notempty}
    </tbody>
</table>
{/eq}